<%@ page language="java" pageEncoding="utf-8"%>

<!DOCTYPE html>
<html>
<head>
    <%@include file="../common/base.jsp"%>
	<meta charset="utf-8" />
	<meta name ="viewport" content ="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1" />
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="Cache-Control" content="no-cache,must-revalidate">
	<meta http-equiv="expires" content="0">
	<title>行程已取消</title>
    <link rel="stylesheet" type="text/css" href="${base}/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="${base}/css/global.css?version=${version}">
    <link rel="stylesheet" type="text/css" href="${base}/css/takecar.css?version=${version}">
</head>
<body>
    <div class="container-fluid">
    	<div class="divBox driver-info">
			<%@include file="driverHtml.jsp"%>
			<p class="tip">
				行程已取消
			</p>
    	</div>
		<%@include file="startEnd.jsp"%>
		<div class="paymoney" style="border: none;">
			<div class="imgcBox">
				<img class="imgc" src="${base}/images/cancel-icon.png">
			</div>
			<p class="tip text-center" id="cancelReason">
				${sessionScope.cancelReason}
			</p>
			<div style="text-align: center;">
				<a class="cancel-href cancel-rule" id="cancel-rule" style="vertical-align: middle;">取消规则</a>
			</div>
		</div>
    </div>
</body>
<script type="text/javascript" src="${base}/js/jquery.min.js"></script>
<script type="text/javascript" src="${base}/plugin/layer-v3.0.3/layer.js"></script>
<script type="text/javascript" src="${base}/js/localStorageOpt.js?version=${version}"></script>
<script type="text/javascript" src="${base}/js/utils.js?version=${version}"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
    var yun=new yueajax( "${openId}");
    var $document = $(document);
    //取消规则路径
    yun.order_ajax(function(data){
        $('#cancel-rule').attr('href',base+'/h5/passenger/cancelRule?appid='+appid+'&orderUuid='+data.data.uuid);
    },function (data) {

    })
    //初始化请求订单数据
    getOrderStatus(function (data) {
        //订单创建时间
        var cTime=new Date(data.data.createOn);
        var cTobj=yun.time_count(cTime)
        var driver=data.data.driver;
        $('#faceimg').attr('src',driver.face || '${base}/images/man.png');
        $('#driver_name').html(driver.name);
        $('#driver_score').append(driver.score)
        $('#driver_orderCount').html(driver.orderCount+'单')
        $('#driver_plateNum').html(driver.plateNum)
        $('#driver_carColor_brandName').html(driver.carColor+driver.brandName);
        $('#driver_mobile').attr('href','tel:'+driver.mobile);
        $('#clickCall').attr('href','tel:'+driver.mobile);
		$('#cancelReason').html(data.data.cancelReason)
        $('#creadtime').html(cTobj.day+'  '+cTobj.hour+cTime.format('hh:mm'));
        $("#originDetailAddressText").html(data.data.originAddress);
        $("#destDetailAddressText").html(data.data.destAddress);
		var isF=url.getQueryString('flag');
		if(isF!='false'){
            setTimeout(goIndex,6000);
		}

    });
    function getOrderStatus(callback) {
        yun.order_ajax(function(data){
            if(typeof callback =="function"){callback(data);}
        },function (data) {layer.msg(data.msg())})
    }

	function goIndex() {
        changeUrl('index')
	}

});
</script>
</html>